Conditions | 2 |
Total Lines | 11 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { |
||
35 | |||
36 | @Post() |
||
37 | public async post(@Body() taskDto: TaskDTO, @Res() res: Response) { |
||
38 | const { name } = taskDto; |
||
39 | |||
40 | try { |
||
41 | await this.commandBus.execute(new CreateTaskCommand(name)); |
||
42 | |||
43 | res.redirect(303, this.resolver.resolve('crm_tasks_list')); |
||
44 | } catch (e) { |
||
45 | throw new BadRequestException(e.message); |
||
46 | } |
||
49 |